package org.hp.util;

import com.github.pagehelper.PageInfo;
import lombok.Data;
import org.hp.bean.Admin;

import java.util.HashMap;
import java.util.List;

@Data
public class Layui extends HashMap<String, Object> {
    private int code;
    private String msg;
    private int count;
    private Object data;
    public static Layui select(Object data){
        Layui layui=new Layui();
        layui.put("code",0);
        layui.put("msg","");
        layui.put("data",data);
        return layui;
    }
//分页用的
    public static Layui select(int count,Object data){
        Layui layui=new Layui();
        layui.put("code",0);
        layui.put("msg","");
        layui.put("count",count);
        layui.put("data",data);
        return layui;
    }

    public static Layui select(){
        Layui layui=new Layui();
        layui.put("code",0);
        layui.put("msg","");
        return layui;
    }

    public static Layui update(int code){
        Layui layui=new Layui();
        layui.put("code", code);
        layui.put("msg","");
        return layui;
    }

}